package com.ctgu.chatapp.model.pojo

import androidx.room.*

/***
 *
 * state:0表示发送方未处理,1表示同意,2表示拒绝,3表示处理方未处理,4表示自己发送的请求被同意,5表示自己发送的请求被拒绝
 *
 * requestType:1表示好友请求,2表示群请求
 *
 */
@Entity(indices = [Index("uid")])
data class Request(
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    val id: Int?,
    val uid: Long,
    val touId: Long,
    val state: Int,
    val timestamp: Long
) {
    @Ignore
    constructor(uid: Long, touId: Long, state: Int, timestamp: Long) : this(
        null,
        uid,
        touId,
        state,
        timestamp
    )
}